package com.zlp.mall.modules.oms.service.impl;

import com.alibaba.fastjson.JSON;
import com.zlp.mall.common.api.Pager;
import com.zlp.mall.modules.oms.dto.*;
import com.zlp.mall.modules.oms.model.Order;
import com.zlp.mall.modules.oms.mapper.OrderMapper;
import com.zlp.mall.modules.oms.service.OrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单表 服务实现类
 * </p>
 *
 * @author ZouLiPing
 * @since 2021-11-03
 */
@Service
@Slf4j(topic = "OrderServiceImpl")
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {

    @Override
    public Pager<Order> list(OrderQueryParam queryParam, Integer pageSize, Integer pageNum) {
        log.info("list.req queryParam={}", JSON.toJSONString(queryParam));

        return new Pager<>();
    }

    @Override
    public boolean delivery(List<OrderDeliveryParam> deliveryParamList) {
        log.info("delivery.req deliveryParamList={}",JSON.toJSONString(deliveryParamList));
        return Boolean.TRUE;
    }

    @Override
    public boolean close(List<Long> ids, String note) {
        log.info("close.req ids={},note={}",JSON.toJSONString(ids),note);
        return Boolean.TRUE;
    }

    @Override
    public boolean delete(List<Long> ids) {
        return Boolean.TRUE;
    }

    @Override
    public OmsOrderDetail detail(Long id) {
        return null;
    }

    @Override
    public int updateReceiverInfo(OmsReceiverInfoParam receiverInfoParam) {
        return 1;
    }

    @Override
    public int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam) {
        return 0;
    }

    @Override
    public Boolean updateNote(Long id, String note, Integer status) {
        return null;
    }
}
